<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html;charset=utf-8" />
<meta http-equiv="x-ua-compatible" content="ie=edge" />
<title>checkboxlist demo(配置type为week)</title>
<link type="text/css" rel="stylesheet"  href="../highlight/shCore.css"/>
<link type="text/css" rel="stylesheet" href="../style/avalon.doc.css"/>
<script src="../highlight/shCore.js"></script>
<script src="../avalon.js"></script>
</head>
<body>
    <div class="wrapper">
        <h1>checkboxlist demo 3</h1>
        <p class="example">checkboxlist组件默认提供了type为week时的data（<span class="statement">data-checkboxlist-type="week"</span>）,只需简单配置就可完成星期一到星期日的选项的展示。如要配置初始选中项，值必须是["TUESDAY","MONDAY","WEDNESDAY","THURSDAY","FRIDAY","SATURDAY","SUNDAY"]中的表示星期几的英文全写</p>
        <div ms-skip>
            <pre class="brush: js; html-script: true; gutter: false; toolbar: false">
                &lt;!DOCTYPE HTML&gt;
                &lt;html&gt;
                &lt;head&gt;
                    &lt;meta charset='utf-8'/&gt;
                    &lt;title&gt;配置type为week&lt;/title&gt;
                    &lt;script src='avalon.js'&gt;&lt;/script&gt;
                &lt;/head&gt;
                &lt;body&gt;
                    &lt;div class="demo-show" ms-controller="demo3"&gt;
                        &lt;fieldse&gt;
                            &lt;legend&gt;设置type为week展示周一到周日的选项&lt;/legend&gt;
                            &lt;ul ms-widget="checkboxlist" data-checkboxlist-type="week" data-checkboxlist-duplex="val" data-checkboxlist-alltext="全部"&gt;
                            &lt;/ul&gt;
                        &lt;/fieldset&gt;

                        {{ val }}
                    &lt;/div&gt;
                    &lt;script&gt;
                        require(["./checkboxlist/avalon.checkboxlist"], function(avalon) {
                            avalon.define('demo3',function(vm){
                                vm.val = ['TUESDAY'];
                            });
                            avalon.scan();
                        });
                    &lt;/script&gt;
                &lt;/body&gt;
                &lt;/html&gt;
            </pre>
        </div>
        <div class="demo-show" ms-controller="demo3">
            <fieldse>
                <legend>设置type为week展示周一到周日的选项</legend>
                <ul ms-widget="checkboxlist" data-checkboxlist-type="week" data-checkboxlist-duplex="val" data-checkboxlist-alltext="全部">
                </ul>
            </fieldset>

            {{ val }}
        </div>
        <script>
            require(["./checkboxlist/avalon.checkboxlist"], function(avalon) {
                avalon.define('demo3',function(vm){
                    vm.val = ['TUESDAY','MONDAY'];
                });
                avalon.scan();
            });
        </script>
    </div>
</body>
</html>